@model MvcCmsSocial.Models.ViewData.SocialModel
<div class="wallmessage-left">
<div>
    <h2>
        Recent Posts</h2>
    
        @if (Model._Posts != null)
        {

            foreach (var post in Model._Posts)
            {
                <a href='/forums/forum-@post.ForumPath/@post.Path/#pst-@post.PostID'>@post.Title</a>        
                @post.AddedDate.ToShortDateString()
                <br />    
            }
        }
        else
        {
            Response.Write("none so far...");
        }
    
</div>
<div>
    <h2>Recent Wiki's</h2>
     
        @if (Model._WikiContents != null)
        {        
            string version = "";
            foreach (var content in Model._WikiContents)
            {
                if (content.IsCurrentVersion) { version = "/v" + content.Version.ToString(); }    
                @MvcHtmlString.Create("<a href=/wiki/" + content.WikiTitle.Slug + version + ">" + content.WikiTitle.Name + "</a> on:" + content.VersionDate.ToShortDateString())
                <br />    
            }
        }  
        else
        {
            @("none so far...")
        }             
    
</div>
<div>
    <h2>
        Recent Comments</h2>
     
        @if (Model._Comments != null)
        {        
            int commentLength=0;
            foreach (var comment in Model._Comments)
            {
                if (comment.ContentPage.IsCategoryPage) { comment.ContentPage.Path = ""; comment.ContentPage.ContentCategory.Title = ""; }
    
                @MvcHtmlString.Create("Comment at <a href='/" + comment.ContentPage.ContentCategory.Path + "/" + comment.ContentPage.Path + "'>" + comment.ContentPage.ContentCategory.Title + " " + comment.ContentPage.Title + "</a> On: " + comment.AddedDate.ToShortDateString())
                <blockquote>
    
                @if (comment.Body.Length < 150) {commentLength=comment.Body.Length-1;} else {commentLength =150;}
                @MvcHtmlString.Create(comment.Body.Substring(0, commentLength))
                ...
                </blockquote>
                <br />           
             }
        }  
        else
        {
            @("none so far...")
        }             
    
</div>
</div>
<div class="wallmessage-right">
    @Html.Partial("ControlsSocial/Messages", Model)
</div>
<div class="clear"></div>